package com.superbytecode.stencil.consts;

import com.superbytecode.stencil.enums.DatabaseTypeEnum;
import lombok.experimental.UtilityClass;

import java.time.format.DateTimeFormatter;
import java.util.Arrays;
import java.util.List;

/**
 * All rights Reserved, Designed By www.super-master.com
 *
 * @ProjectName: code-stencil
 * @Package: com.superbytecode.stencil.consts
 * @ClassName: StencilConst
 * @Description: [配置·常量]
 * <p> </p>
 * @Author: [Lance Ting]
 * @Date: 2024/10/11 18:33
 * @Version: V1.0
 * @Copyright: 2024 www.super-master.cn Inc. All rights reserved.
 * TODO: 注意,本文件Lance Ting所作,如果转载或使用请标明具体出处!
 **/
@UtilityClass
public class StencilConst {
    /**
     * 时间格式常量
     **/
    public final DateTimeFormatter FORMATTER_DATETIME = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
    public final DateTimeFormatter FORMATTER_DATE = DateTimeFormatter.ofPattern("yyyy-MM-dd");
    public final DateTimeFormatter FORMATTER_TIME = DateTimeFormatter.ofPattern("HH:mm:ss");


    /**
     * urlPattern占位符
     *
     * @see: {@link DatabaseTypeEnum}
     * <br>
     * jdbc:数据库://{url}:{post}/{db_name}?其他配置信息
     */
    // 数据源配置数据库服务ip/域名
    public final String DB_REGION_HOST = "{db_host}";
    // 数据源配置数据库服务端口号
    public final String DB_REGION_PORT = "{db_port}";
    // 数据源配置数据库服务名称
    public final String DB_REGION_NAME = "{db_name}";
    // 必须的占位符
    public final List<String> DB_REGION_REQUIRES = Arrays.asList(DB_REGION_HOST, DB_REGION_PORT, DB_REGION_NAME);

}